Skip to content

GitHub Issue 959: Fallback when indexing hits IO problems#7519

Open
labkey-jeckels wants to merge 5 commits intorelease26.3-SNAPSHOTfrom
26.3_fb_959_indexingFallback
Open

GitHub Issue 959: Fallback when indexing hits IO problems#7519
labkey-jeckels wants to merge 5 commits intorelease26.3-SNAPSHOTfrom
26.3_fb_959_indexingFallback

Conversation

@labkey-jeckels
Copy link
Contributor

@labkey-jeckels labkey-jeckels commented Mar 24, 2026

Rationale

We can end up in a tight infinite logging loop if there's an IO problem when committing the full text search index.

Changes

  • Propagate exceptions during index commit
  • Consolidate fallback code for indexing problems

@labkey-jeckels labkey-jeckels self-assigned this Mar 24, 2026
try {_log.warn("error in indexer", t);} catch (Throwable x){/* */}
if (!_shuttingDown)
{
postFailureDelay(e, "Error in indexer", _log, ++consecutiveCommitFailures, INDEX_EVENT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious if we want this to happen for all errors? Or are there specific errors we care about (e.g. IOException). Maybe this question would matter less if we used consecutiveCommitFailures++ instead of preincrement. Then we wouldn't inject a 30s wait on the first error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_indexLoop() doesn't declare any exceptions so it's just runtimes or errors that could get through at this point, which wrap the underlying IOException in the original repro case.

I like the idea of postincrementing through, regardless of the exact original error. That should still avoid overwhelming the logs, but be a bit more optimistic about recovery. Pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants